package com.juicygames.framework.touch;

import android.view.MotionEvent;

public class WorldTouchAction extends AbstractTouchAction {
	
	private boolean entityWasTouched = false;
	
	private static WorldTouchAction instance = null;
	
	public static WorldTouchAction getInstance(MotionEvent event) {
		if (instance == null) {
			instance = new WorldTouchAction(event);
		} else {
			instance.setEvent(event);
			instance.setX(event.getX());
			instance.setY(event.getY());
		}
		return instance;
	}
	
	private WorldTouchAction(MotionEvent event) {
		super(event);
	}

	public boolean isEntityWasTouched() {
		return entityWasTouched;
	}

	public void setEntityWasTouched(boolean entityWasTouched) {
		this.entityWasTouched = entityWasTouched;
	}

}
